package kolekcje.eng.powtorka.bis;

public class Piosenka implements Comparable<Piosenka> {

	private String tytul;
	private String artysta;
	private String ranking;
	private String bpm;

	public Piosenka(String tytul, String artysta, String ranking, String bpm) {
		this.tytul = tytul;
		this.artysta = artysta;
		this.ranking = ranking;
		this.bpm = bpm;
	}

	@Override
	public int compareTo(Piosenka arg0) {
		return this.tytul.compareTo(arg0.getTytul());
	}

	@Override
	public String toString() {
		return this.tytul + ", " + this.artysta + ", " + this.ranking + ", "
				+ this.bpm;
	}

	@Override
	public boolean equals(Object o) {
		Piosenka p;
		p = (Piosenka) o;
		return this.tytul.equals(p.getTytul());
	}
	
	@Override
	public int hashCode(){
		return this.tytul.hashCode();
	}

	public String getTytul() {
		return tytul;
	}

	public String getArtysta() {
		return artysta;
	}

	public String getRanking() {
		return ranking;
	}

	public String getBpm() {
		return bpm;
	}
}
